package cn.wzl.tanks.abstractfactory;

import cn.wzl.tanks.*;
import lombok.Data;

import java.awt.*;

/**
 * @author weiZhiLin
 * @version 1.0
 * @date 2021/6/7 21:19
 */
@Data
public abstract class BaseTank {
    // 坐标
    protected int x, y;
    // 速度
    protected static final int SPEED = 5;
    // 方向
    protected Dir dir;
    // 是否移动
    protected boolean moving = false;
    // 绘图
    protected TankFrame frame;
    // 图片宽高
    public static final int WIDTH = ResourceMrg.TDIMG.getWidth();
    public static final int HEIGHT = ResourceMrg.TDIMG.getHeight();
    // 是否存活
    protected boolean living = true;
    // 阵营
    protected Group group;
    // 开火策略
    protected Fire f;

    //坦克绘制
    public abstract void paint(Graphics g);

    public abstract void fire();
}
